function paybtnFn(id) {
	zeai.ajax({url:MHOST+'/huxuan_detail'+zeai.extname,js:1,data:{submitok:'bm',id:id}},function(e){var rs=zeai.jsoneval(e);
		if(rs.flag==1){
			money=o('money').value;o('money_str').html(money+'元');
			ZeaiM.div_up({obj:czbox,h:pH});
		}else if(rs.flag=='starthx'){
			zeai.openurl('hongniang_ulist.php');
		}else{
			ZeaiM.sorry(rs);
		}
	});
}
function hxFn(id,uid) {
	zeai.alertplus({title:'<b>确定要选择'+sex_str+'么</b>？',content:'本次活动您最多能选择 '+my_json_hxnum+' 人'+my_json_hxnum2_str+'<br>选择后将不能更换，请认真对待<br><br>'+json_hxnum_str,title1:'我再想想',title2:'确定',
		fn1:function(){zeai.alertplus(0);},
		fn2:function(){zeai.alertplus(0);
			zeai.ajax({url:MHOST+'/hongniang_u'+zeai.extname,js:1,data:{ifhx:1,submitok:'ajax_hx_add',id:id,uid:uid}},function(e){var rs=zeai.jsoneval(e);
				if(rs.flag==1){
					zeai.msg(rs.msg,{time:4});
					setTimeout(function(){location.reload(true);},4000);
				}else{
					ZeaiM.sorry(rs);
				}
			});
		}
	});
}
function hx_djs(Hid,Mid,Sid,intDiff) {
	var tmpid = window.setInterval(function () {
		var hour = 0,minute = 0,second = 0;
		if (intDiff > 0) {
			hour = Math.floor(intDiff / (60 * 60));
			minute = Math.floor(intDiff / 60) - (hour * 60);
			second = Math.floor(intDiff) - (hour * 60 * 60) - (minute * 60);
			if (hour <= 9) hour = '0' + hour;
			if (minute <= 9) minute = '0' + minute;
			if (second <= 9) second = '0' + second;
			Hid.html(hour);
			Mid.html(minute);
			Sid.html(second);
			intDiff--;
		}else{
			window.location.reload();
		}
	}, 1000);
}
var zeai_iMarquee = function (id, tag, heigh, speed, delay) {
	var me = this;
	me.EL = document.getElementById(id);
	me.PA = 0;
	me.TI = null;
	me.LH = heigh;
	me.SP = speed;
	me.DY = delay;
	me.exec = function () {
		if (me.PA) return;
		me.EL.scrollTop += 2;
		if (me.EL.scrollTop % me.LH <= 1) {
			clearInterval(me.TI);
			me.EL.appendChild(me.EL.getElementsByTagName(tag)[0]);
			me.EL.scrollTop = 0;
			setTimeout(me.start, me.DY * 1000);
		}
	};
	me.start = function () {if (me.EL.scrollHeight - me.EL.offsetHeight >= me.LH) me.TI = setInterval(me.exec, me.SP);};
	setTimeout(me.start, me.DY * 1000);
};
function zeai_iMarqueeFn(){
	zeai.ajax({url:MHOST+'/huxuan_detail'+zeai.ajxext+'submitok=ajax_iMarquee&id='+id},function(e){
		if(!zeai.empty(e)){
			iMarquee.html(e);
			setTimeout(function(){new zeai_iMarquee("iMarquee","li",40,30,1);},100);
		}
	});
}
